<template>
  <div id="app" :class="header.title ? `padding-top` : ``">
    <layerHeader />
    <div id="nav">
      <router-link to="/">首页</router-link>
      <router-link to="/orderDetails">商品详情</router-link>
      <router-link to="/type">分类</router-link>
      <router-link to="/cart">购物车</router-link>
      <router-link to="/my">我的</router-link>
      <router-link to="/address">选择地址</router-link>
      <router-link to="/addAddress">增加地址</router-link>
      <router-link to="/allOrder">全部订单</router-link>
      <router-link to="/submitOrder">提交订单</router-link>
      <router-link to="/buySucc">购买成功</router-link>
      <router-link to="/serachProduct">搜索</router-link>
      <router-link to="/searchPage">搜索结果</router-link>
    </div>
    <router-view />
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
// import LayerHeader from '@/components/layer/header'
import layerHeader from '@/components/header'
export default {
  components: {
    layerHeader
  },
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['header'])
  }
}
</script>
<style lang="less">
body {
  margin: 0;
  // padding-bottom: 55px;
  font-family: "微软雅黑";
  overflow-x: hidden;
  .padding-top {
    padding-top: calc(45px);
    background: #F5F6F8;
  }
}
</style>

